package com.lin.subject.infra.basic.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.lin.subject.infra.basic.entity.SubjectMapping;

import java.util.LinkedList;
import java.util.List;

/**
* @author jeremylin
* @description 针对表【subject_mapping(题目分类关系表)】的数据库操作Service
* @createDate 2024-10-21 09:14:06
*/
public interface SubjectMappingService extends IService<SubjectMapping> {

    List<SubjectMapping> getByCategoryId(Long categoryId);

    void batchInsert(LinkedList<SubjectMapping> subjectMappings);

    /**
     * 根据题目id，查询所有映射关系
     * @param id
     * @return
     */
    List<SubjectMapping> getBySubjectId(Long id);

    List<SubjectMapping> queryLabelId(SubjectMapping subjectMapping);

    /**
     * 根据题目类型，查询对应的count
     *
     * @return
     */
    List<SubjectMapping> querySubjectCount();

    /**
     * 根据条件查找
     * @param subjectMapping
     * @return
     */
    List<SubjectMapping> queryCondition(SubjectMapping subjectMapping);

    /**
     * 删除映射关系
     * @param id
     */
    void removeMapping(Long id);
}
